import { defineStore } from "pinia";

export const userOrderStore = defineStore("userInfo", {
  state: () => ({
    userInfo: {},
  }),
  getters: {
    userInfoData: (state) => state.userInfo,
  },
  actions: {
    setUserInfo(item) {
      this.userInfo = item;
      localStorage.setItem("userInfo", JSON.stringify(this.userInfo));
    },
  },
});

export default userOrderStore